package net.opslog.web.client.util;

import java.util.HashMap;

public class Properties {
	private HashMap<String, String> properties = new HashMap<String, String>();

	public void Properties() {
	}

	public String getProperty(String property) {
		if (properties.containsKey(property)) {
			return properties.get(property);
		}
		return null;
	}

	public void load(String text) {
		String[] key_value;

		for (String line : text.split("\n")) {
			line = line.trim();
			if (!line.startsWith("#")) {
				key_value = line.split("=", 2);
				properties.put(key_value[0].trim(), key_value[1].trim());
			}
		}
	}

}
